#!/bin/bash

[ -d /yum ]&&echo "file is exits"||mkdir /yum 
mount /dev/cdrom /yum
cd /etc/yum.repos.d/

cat <<EOF > local.repo
[local_yum]
name=local yum
baseurl=file:///yum
enabled=1
gpgcheck=0
EOF

[ -d backup ]&&echo "backup is exsits"||mkdir backup
ls
mv CentOS-* backup/
ls
yum clean all
